﻿var app = angular.module('app', ['ngRoute', 'LocationDirective','NoteFactory']);

app.config(['$routeProvider', function ($routeProvider) {
    $routeProvider.when('/', {
        templateUrl: '/App/Views/Home.html',
        title: 'Home'
    }).when('/Register', {
        templateUrl: '/App/Views/Register.html',
        title: 'Register',
        caseInsensitiveMatch: true
    }).when('/Login', {
        templateUrl: '/App/Views/Login.html',
        title: 'Login',
        caseInsensitiveMatch: true
    }).otherwise({
        redirectTo: '/'
    });
}]);

var NoteApp = angular.module("NoteApp", []);
NoteApp.controller("NoteController", function ($scope) {
    $scope.query = {}
    $scope.queryBy = '$'
    $scope.notes = [];
    $scope.Users = [];
    $scope.orderProp = "name";
});
(function () {
    angular.module('app', ['ngRoute'])
    .config(Config)
    .factory('LoginFactory', LoginFactory)
    .factory('UserFactory', UserFactory)
    .factory('AuthFactory', AuthFactory)
    .factory('NoteFactory', NoteFactory)
    .controller('HomeController', HomeController)
     .controller('MapLocationController', MapLocationController)
    .controller('NavbarController', NavbarController)
    .controller('UserController', UserController)
})();